
#include <iostream>
#include <cmath>

using namespace std;
// t.kind==number represent t is a number;
const char number = '8';
const char quit = 'q';
const char print = ';';
const char let = 'l';
const string declkey = "let";
const char name = 'a';

const string prompt = ">";
const string result = "=";

class Token {
public:
    char kind;
    double value;
    string name;

    Token() : kind{0}, value{0}, name{0} {}

    Token(char ch) : kind{ch} {}

    Token(char ch, double val) : kind{ch}, value{val} {}

    Token(char ch, string n) : kind{ch}, name{n} {}
};


class Token_stream {
public:
    Token get();

    void putback(Token token);

    void ignore(char c);

private:
    bool full{false};
    Token buffer{};
};

class Variable {
public:
    std::string name;
    double value;
};



double expression();

double term();

double primary();

double declaration();